<?php

class MoodAction extends BaseAction {

	public function index() {
//		import("ORG.Util.Page");
		$mood_obj = D('mood');
//		$count = $mood_obj->count();
//		$Page = new Page($count,5);
//		$show = $Page->show();
		
		

		$mood_list = $mood_obj->order("cTime desc")/*->limit($Page->firstRow.','.$Page->listRows)*/->select();
		
		$this->assign("moods", $mood_list);
//		$this->assign('pages',$show);
		$this->display("Index:mood");
	}

	public function reply(){
		$data = $_POST;
		$data['cTime'] = time();
		$data['ip']=$_SERVER["HTTP_X_FORWARDED_FOR"];
		if(D("mood")->add($data)){
			//			$this->success("修改成功！");
		}else{
			//			$this->error("资料无改变或修改失败！");
		}
		//		$this->redirect("message/"/*,null, 3, '页面跳转中~'*/);

	}

}
?>